package com.osmino.contacts.groups;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ListView;

public class MListView extends ListView {
	
	private boolean isScrollingEnabled = true;
	
	public MListView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}
	public MListView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}
	public MListView(Context context) {
		super(context);
	}
	public void setEnableScrolling(boolean enabled) {
		isScrollingEnabled = enabled;
	}
	@Override
	public boolean onTouchEvent(MotionEvent ev) {
		if(isScrollingEnabled){
			return super.onTouchEvent(ev);
		}
		else{
			return true;
		}
	}
}
